package socketing;

public class DebugInter implements SimpleIntercepter{
        private static SimpleIntercepter s = new DebugInter();
        public static synchronized SimpleIntercepter getInstance() {
                if (s == null) {
                    synchronized (DebugInter.class) {
                        return new DebugInter();
                    }
                }
                return s;
        }
        @Override
        public boolean prehandle(SocketTask.MttpRequest req, SocketTask.MttpResponse res) {
            Tool.debug("req"+req);
            return true;
        }

        @Override
        public void posthandle(SocketTask.MttpRequest req, SocketTask.MttpResponse res, Object o) {
            Tool.debug("走人了");
        }

}
interface SimpleIntercepter{
    boolean prehandle(SocketTask.MttpRequest req, SocketTask.MttpResponse res);
    void posthandle(SocketTask.MttpRequest req, SocketTask.MttpResponse res, Object o);
}